package cn.wenhaha.app.data.bean.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 插件信息
 * --------
 *
 * @author ：wyndem
 * @Date ：Created in 2022-07-10 22:21
 */
@Data
public class SyncPluginInfoDTO {

    @NotEmpty(message = "名称不能为空")
    private String name;
    @NotEmpty(message = "图标不能为空")
    private String icon;
    @NotEmpty(message = "作者不能为空")
    private String author;
    @NotEmpty(message = "描述不能为空")
    private String info;
    @NotEmpty(message = "版本不能为空")
    private  String version;
    @NotEmpty(message = "code不能为空")
    @Length(min = 4,max=20, message = "code长度不符合规范")
    @Pattern(regexp = "^[a-zA-Z0-9]+$",message = "code只允许英文和数字")
    private String code;
 /*   @NotEmpty(message = "实现上下文不能为空")
    private String context;*/
    @NotEmpty(message = "支持的数据源code不能为空")
    private String support;

}
